package com.xiaoyuanxing.demo.mapper;

import com.github.pagehelper.Page;
import com.xiaoyuanxing.demo.entity.School;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*
 **@author LuoShengYing
 **@date 2021/5/22
 */
@Mapper
public interface SchoolMapper {

    // 查询School数组
    @Select("select * from `school`")
    Page<School> selectList();

    // 通过schoolID查询schoolName
    @Select("select `schoolName` from `school` where `schoolID` = #{schoolID}")
    String selectSchoolNameBySchoolID(@Param("schoolID") int schoolID);
}
